package com.glb.gilibuy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * user_order_item
 * @author 
 */
@ApiModel(value="com.glb.gilibuy.entity.UserOrderItem订单商品项表")
@Data
public class UserOrderItem implements Serializable {
    /**
     * id
     */
    @ApiModelProperty(value="id")
    private Long id;

    /**
     * 订单详情id
     */
    @ApiModelProperty(value="订单详情id")
    private String orderItemId;

    /**
     * 订单id
     */
    @ApiModelProperty(value="订单id")
    private String orderId;

    /**
     * 商品id
     */
    @ApiModelProperty(value="商品id")
    private String productId;

    /**
     * 商品项总价格
     */
    @ApiModelProperty(value="商品项总价格")
    private BigDecimal orderItemPrice;

    /**
     * 商品项数量
     */
    @ApiModelProperty(value="商品项数量")
    private Integer orderItemAmount;

    /**
     * 虚拟商品二维码地址(同种可多张)
     */
    @ApiModelProperty(value="虚拟商品二维码地址(同种可多张)")
    private String qrCode;

    /**
     * 创建时间
     */
    @ApiModelProperty(value="创建时间")
    private Date gmtCreate;

    /**
     * 更新时间
     */
    @ApiModelProperty(value="更新时间")
    private Date gmtModified;

    /**
     * 是否被删除：0->否；1->是
     */
    @ApiModelProperty(value="是否被删除：0->否；1->是")
    private Integer isDeleted;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserOrderItem other = (UserOrderItem) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getOrderItemId() == null ? other.getOrderItemId() == null : this.getOrderItemId().equals(other.getOrderItemId()))
            && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
            && (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
            && (this.getOrderItemPrice() == null ? other.getOrderItemPrice() == null : this.getOrderItemPrice().equals(other.getOrderItemPrice()))
            && (this.getOrderItemAmount() == null ? other.getOrderItemAmount() == null : this.getOrderItemAmount().equals(other.getOrderItemAmount()))
            && (this.getQrCode() == null ? other.getQrCode() == null : this.getQrCode().equals(other.getQrCode()))
            && (this.getGmtCreate() == null ? other.getGmtCreate() == null : this.getGmtCreate().equals(other.getGmtCreate()))
            && (this.getGmtModified() == null ? other.getGmtModified() == null : this.getGmtModified().equals(other.getGmtModified()))
            && (this.getIsDeleted() == null ? other.getIsDeleted() == null : this.getIsDeleted().equals(other.getIsDeleted()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getOrderItemId() == null) ? 0 : getOrderItemId().hashCode());
        result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
        result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
        result = prime * result + ((getOrderItemPrice() == null) ? 0 : getOrderItemPrice().hashCode());
        result = prime * result + ((getOrderItemAmount() == null) ? 0 : getOrderItemAmount().hashCode());
        result = prime * result + ((getQrCode() == null) ? 0 : getQrCode().hashCode());
        result = prime * result + ((getGmtCreate() == null) ? 0 : getGmtCreate().hashCode());
        result = prime * result + ((getGmtModified() == null) ? 0 : getGmtModified().hashCode());
        result = prime * result + ((getIsDeleted() == null) ? 0 : getIsDeleted().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", orderItemId=").append(orderItemId);
        sb.append(", orderId=").append(orderId);
        sb.append(", productId=").append(productId);
        sb.append(", orderItemPrice=").append(orderItemPrice);
        sb.append(", orderItemAmount=").append(orderItemAmount);
        sb.append(", qrCode=").append(qrCode);
        sb.append(", gmtCreate=").append(gmtCreate);
        sb.append(", gmtModified=").append(gmtModified);
        sb.append(", isDeleted=").append(isDeleted);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}